package kwlee.googlemap.test;

import java.util.*;
import android.graphics.*;
import android.graphics.drawable.Drawable;

import com.google.android.maps.*;

public class MyIconItemizedOverlay extends ItemizedOverlay<OverlayItem> {

	private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
	
	public MyIconItemizedOverlay(Drawable defaultMarker) {
		super(boundCenterBottom(defaultMarker));
	}

	@Override
	protected OverlayItem createItem(int i) {
		return mOverlays.get(i);
	}

	@Override
	public int size() {
		return mOverlays.size();
	}
	
	public void addOverlayItem(OverlayItem overlay){
		mOverlays.add(overlay);
		populate();
	}
	
}
